import request from '@/utils/request'

// 查询企业的部门列表
export function getDepartmentsInfo() {
  return request({
    url: '/company/department'
  })
}

// 新增部门
export function addDepartmentsInfo(data) {
  return request({
    url: '/company/department',
    method: 'POST',
    data
  })
}

// 根据ID删除部门
export function delDepartmentsInfo(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'DELETE'
  })
}

// 根据ID修改部门详情
export function updateDepartmentsInfo(data) {
  return request({
    url: `/company/department/${data.id}`,
    method: 'PUT',
    data
  })
}
